#ifndef __GROUP_H
#define __GROUP_H

#include "node.h"
#include "FrustumMath.h"
#include <vector>


class group : public node
{
 public:	
	std::vector<node*> children;

        group() :	children(0)
	{
		bounding_radius=0.0;
	}

	void add(node *c) {
		children.push_back(c);
		bounding_radius = max(bounding_radius, c->bounding_radius);
	}

	void remove(int i) {
		children.erase(children.begin()+i);
	}
	
	void draw(Matrix4 *transform, FrustumMath fmath) {
		for (size_t i=0; i<children.size(); i++)
			children[i]->draw(transform, fmath);
	}

};

#endif
